/* Copyright (c) 2016-2020 Enfry Ltd. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of Enfry. 
 * You shall not disclose such Confidential Information
 * and shall use it only in accordance with the terms of the agreements
 * you entered into with Enfry.
 */
package com.enfry.validation;

import com.enfry.validation.config.Rule;

/**
 * 校验框架中的执行接口
 * 该接口为重要接口，处理每个验证的处理方法
 * @Title com.enfry.validation.IValidator
 * @author liulei
 * @date 2016年7月22日
 */
public interface IValidator {

    /** 
     * 要处理的对象
     * @param data  验证的数据对象
     * @param type  验证字段的类型
     * @param value 验证字段的值
     * @param rule  验证规则
     * @return boolean 是否成功
     * @author liulei
     * @date 2016年7月22日
     */
    public boolean execute(Object data, Class<?> type, Object value, Rule rule);

}
